//
//  TimerBlock.h
//  etionMisc
//
//  Created by wu jingxing on 12-8-9.
//  Copyright (c) 2012年 GuangZhouXuanWu. All rights reserved.
//

#import <Foundation/Foundation.h>

#import <mach/mach_time.h>

@class XMSTimerBlock;

typedef void(^timerblock)(XMSTimerBlock* timer);

@interface XMSTimerBlock : NSObject

-(id)initScheduledTimerWithTimeInterval:(NSTimeInterval)interval repeats:(BOOL)bRepeat block:(timerblock)block;

-(id)initTimerWithTimeInterval:(NSTimeInterval)interval repeats:(BOOL)bRepeat block:(timerblock)block;

-(void)setFireDateFromNowToTimeInterval:(NSTimeInterval)nSecond runLoop:(NSRunLoop*)runLoop;

-(void)setFireDateFromNowToTimeInterval:(NSTimeInterval)nSecond;

-(void)setFireDate:(NSDate*)date;

-(void)invalidate;

+(uint64_t)functionProcess:(void(^)())block;

@end
